package newcoder.lx_质数因子;

import java.util.Scanner;

/**
 * @Author Mr.wang
 * @Description
 * @Date 2020-04-11
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String nextLine = scanner.nextLine();
            long num = Long.parseLong(nextLine);
            getResult(num);
        }
    }

    public static void getResult(long num) {
        for (int i = 2; i <= num; i++) {
            if (num % i == 0) {
                System.out.print(i + " ");
                getResult(num / i);
                break;
            }
            if (i == num) {
                System.out.print(i + " ");
            }
        }
    }
}
